export default {
  title: [
    { required: true, message: "优惠券名称不能为空", trigger: "blur" },
    { min: 1, max: 15, message: "长度在 1 到 15 个字符", trigger: "blur" }
  ],
  type: [{ required: true, message: "优惠券类型不能为空", trigger: "blur" }],
  describe: [
    { required: true, message: "使用说明不能为空", trigger: "blur" },
    { min: 1, max: 30, message: "长度在 1 到 30 个字符", trigger: "blur" }
  ],
  money: [
    { required: true, message: "优惠券面值不能为空", trigger: "blur" },
    {
      pattern: /^(\d+\.?)?\d{0,2}$/,
      message: "请输入大于零的两位小数",
      trigger: "blur"
    }
  ],
  grant_type: [
    { required: true, message: "发放方式不能为空", trigger: "blur" }
  ],
  num: [
    { required: true, message: "发放数量不能为空", trigger: "blur" },
    {
      pattern: /^[0-9]*[1-9][0-9]*$/,
      message: "请输入大于零的整数",
      trigger: "blur"
    }
  ],

  goods_limit: [
    { required: true, message: "商品限制不能为空", trigger: "blur" }
  ]
};
